package com.cloudweb.oa.api;

import cn.js.fan.util.ErrMsgException;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.cloudweb.oa.vo.Result;
import com.redmoon.oa.flow.Leaf;
import com.redmoon.oa.flow.MyActionDb;
import com.redmoon.oa.flow.WorkflowDb;
import com.redmoon.oa.flow.WorkflowPredefineDb;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;

public interface IWorkflowPlusService {

    boolean rollBack(@RequestParam(value = "actionId") Integer actionId, boolean isRollBackData);

    boolean doAlter(WorkflowDb wf, Leaf lf);

    void doAlterOnSubmit(WorkflowPredefineDb wfp, WorkflowDb wf, MyActionDb mad) throws ErrMsgException;

    int FinishActionBatch(HttpServletRequest request, String ids) throws ErrMsgException;

    boolean finishActionSingle(HttpServletRequest request, MyActionDb mad, String userName, StringBuffer sb) throws ErrMsgException;

    boolean appendUser(JSONObject jsonObject) throws ErrMsgException;

    boolean convertToRedDocument(Integer flowId, Integer attachId, Integer templateId) throws ErrMsgException;

}
